; ORIGINAL: 3dt2.1/examples/views.scm
; $Id: views.scm,v 1.4 1997/04/30 20:24:24 jread Exp $
;- views.scm ------------------------------------------------------
; Define Commonly Used Views (location and size of windows)
;------------------------------------------------------------------

; We first define variables to hold the id of each view.
; This binds the variables to the top-level environment,
; making them global (accessible to everyone).

(define left              #f)
(define front             #f)
(define back              #f)
(define top               #f)
(define bottom            #f)
(define right             #f)
(define upper-front-left  #f)
(define upper-front-right #f)
(define lower-front-left  #f)
(define lower-front-right #f)

; Next we define a procedure to create each view. The id of
; each view is assigned to the top-level environment variable
; previously defined. The title is set to the name of the
; view, so that it is easy to determine the name when you want
; to delete or modify the view.

(define view-left
   (lambda ()
      (set! left (view:dl 0 350 300 300))
      (view:set-title "left" left)
      (view:set (position -100 0 0 ) (position 0 0 0) (gvector 0 0 1) left)
   )
)

(define view-front
   (lambda ()
      (set! front (view:dl 320 350 300 300))
      (view:set-title "front" front)
      (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1) front)
   )
)

(define view-back
   (lambda ()
      (set! back (view:dl 640 350 300 300))
      (view:set-title "back" back)
      (view:set (position 0 100 0) (position 0 0 0) (gvector 0 0 1) back)
   )
)

(define view-top
   (lambda ()
      (set! top (view:dl 480 10 300 300))
      (view:set-title "top" top)
      (view:set (position 0 0 100) (position 0 0 0) (gvector 0 -1 0) top)
   )
)

(define view-bottom
   (lambda ()
      (set! bottom (view:dl 480 700 300 300))
      (view:set-title "bottom" bottom)
      (view:set (position 0 0 -100) (position 0 0 0) (gvector 0 1 0) bottom)
   )
)

(define view-right
   (lambda ()
      (set! right (view:dl 960 350 300 300))
      (view:set-title "right" right)
      (view:set (position 100 0 0) (position 0 0 0) (gvector 0 0 1) right)
   )
)

(define view-upper-front-left
   (lambda ()
      (set! upper-front-left (view:dl 0 10 300 300))
      (view:set-title "upper-front-left" upper-front-left)
      (view:set (position -100 -100 100) (position 0 0 0)
                (gvector 0 0 1) upper-front-left)
   )
)

(define view-upper-front-right
   (lambda ()
      (set! upper-front-right (view:dl 960 10 300 300))
      (view:set-title "upper-front-right" upper-front-right)
      (view:set (position 100 -100 100) (position 0 0 0)
                (gvector 0 0 1) upper-front-right)
   )
)

(define view-lower-front-left
   (lambda ()
      (set! lower-front-left (view:dl 0 700 300 300))
      (view:set-title "lower-front-left" lower-front-left)
      (view:set (position -100 -100 -100) (position 0 0 0)
                (gvector 0 0 1) lower-front-left)
   )
)

(define view-lower-front-right
   (lambda ()
      (set! lower-front-right (view:dl 960 700 300 300))
      (view:set-title "lower-front-right" lower-front-right)
      (view:set (position 100 -100 -100) (position 0 0 0)
                (gvector 0 0 1) lower-front-right)
   )
)
